<?php
include "func.main.php";
/*$season = $_GET['season'];
$episode = $_GET['episode'];*/
$nameVar = $_GET['name'];
$q = mysql_query("SELECT * FROM videos WHERE shortLink='$nameVar'");
$infoInst = mysql_fetch_assoc($q);
$formattedName = str_replace(":", "", str_replace(".", "", str_replace(" ", "-", str_replace("'", "", strtolower(($infoInst['nameEN']))))));
$name = $formattedName;
header31('Видео', 'testvideo'); ?>
<div id="content">

<?php
mysql_query("SET NAMES utf8", $dbh);
$q = mysql_query("SELECT * FROM videos WHERE shortLink='$nameVar'") or die(mysql_error());
/*if (isset($season) && isset($episode)) {*/
if($name == $infoInst['shortLink']) {
if($infoInst = mysql_fetch_assoc($q)) {
?><?//=$name;?>
<style>a.watch {color: #ccc;text-decoration: none;font-weight:bold;}
.watch:hover {color: white;text-shadow: 0.1px 0.1px 10px black;}
.videoSizeSmall, .videoSizeNormal, .videoSizeLarge, .videoSizeFill {font-size: 16px; background: #666;text-align:center;padding: 2px;border-radius: 4px;cursor:pointer;}
.videoSizeSmall:hover, .videoSizeNormal:hover, .videoSizeLarge:hover, .videoSizeFill:hover {background: #888;}
#jquery {display: inline;}</style>
<span id="jqueryHover" style="font-size: 23px;font-weight:bold;font-family:arial;"><?=$infoInst['nameBG'];?>
<div id="jquery" style="width: 200px; height: 100px;background: orange;border-radius: 3px;">Оригинално име: Justin's Back In</div></span><br />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<!--<a id="jqueryClick" href="javascript:void(0);">Show it</a>-->
<a class="watch" href="seasons/3">сезон <?=$infoInst['seasonNumber'];?></a> &raquo; <a class="watch" href="episodeinfo/4-18">епизод <?=$infoInst['episodeNumber'];?></a>&nbsp;&nbsp;&nbsp;<a class="watch" href=""><img src="../img/signs/tick.png" style="margin-bottom: -3px;" />Добави в любими</a>
<div id="videoSizes" style="margin: 5px 0 5px 0;">
	<span class="videoSizeSmall">560x315</span>
	<span class="videoSizeNormal">640x360</span>
	<span class="videoSizeLarge">853x480</span>
	<!--<span class="videoSizeLarger">1280x720</span>-->
	<span class="videoSizeFill">Запълни</span>
</div>
<div id="videoBox" style="width: 560px; height: 315px;background: #333;">
<!--<span style="margin-left: 261.5px;line-height: 315px;/*background: black;*/">Video</span>-->
<script type='text/javascript' src='jwplayer.js'></script>
 
<div id='videoArea'>This text will be replaced</div>
 
<script type='text/javascript'>
  jwplayer('videoArea').setup({
    'flashplayer': 'player.swf',
    'file': 'vid/s4/22.mp4',
    'controlbar': 'bottom',
    'width': '100%',
    'height': '100%'
  });
</script>
</div>
<script>
$('#jquery').hide();
$('#jqueryHover').hover(
      function() {
       $('#jquery').fadeIn('slow');
      },
	  function() {
        $('#jquery').fadeOut('slow');
      }
    );
$('.videoSizeSmall').click(function()  { $('#videoBox').css('width', '560px');   $('#videoBox').css('height', '315px'); });
$('.videoSizeNormal').click(function() { $('#videoBox').css('width', '640px');   $('#videoBox').css('height', '360px'); });
$('.videoSizeLarge').click(function()  { $('#videoBox').css('width', '853px');   $('#videoBox').css('height', '480px'); });
$('.videoSizeLarger').click(function() { $('#videoBox').css('width', '1280px');  $('#videoBox').css('height', '720px'); });
$('.videoSizeFill').click(function() { $('#videoBox').css('width', '100%');  $('#videoBox').css('height', '700px'); });
</script>
<div id="disqus_thread"></div>
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'wowpfansite'; // required: replace example with your forum shortname
	var disqus_developer = 1;

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<?php } else { echo "Такъв епизод не съществува или линкът за достъп е грешен!"; }
} else { echo 'Грешна или липсваща стойност за <b>name</b>.'; }
 ?>
</div>
<?php footer3(); ?>